[DllImport("advapi32.dll")]
private static extern UInt32 LsaRetrievePrivateData(
IntPtr policyHandle,
[MarshalAs(UnmanagedType.CustomMarshaler,MarshalTypeRef=typeof(LSAStringMarshaler))] string KeyName,
[MarshalAs(UnmanagedType.CustomMarshaler,MarshalTypeRef=typeof(LSAStringMarshaler))] ref string PrivateData
);
Declare Function LSARetrievePrivateData Lib "advapi32.dll" (TODO) As TODO
REM Sorry no signature here, I don't grok BASIC.
None.
Do you know one? Please contribute it!
See LsaOpenPolicy for the custom marshaler and some more info on it.
Do not use the LSA private data functions. Instead, use the CryptProtectData and CryptUnprotectData functions.
(However, these won't do when you need to modify COM RunAs Passwords ...)
Please add some!